package cn.piesat.client.converter;

import cn.piesat.client.model.dto.base.task.DefaultClientRunnerDto;
import cn.piesat.client.model.vo.QsEnterDataVo;
import org.springframework.stereotype.Component;

@Component
public class QsEnterDataConverter {

    public QsEnterDataVo runnerDto2EnterDataVo(DefaultClientRunnerDto runnerDto, String resultJson){
        QsEnterDataVo qsEnterDataVo = new QsEnterDataVo();
        qsEnterDataVo.setAlgorithmIdentify(runnerDto.getAlgorithmIdentify());
        qsEnterDataVo.setFileTaskId(runnerDto.getFileTaskId());
        qsEnterDataVo.setHasFlow(runnerDto.getHasFlow());
        qsEnterDataVo.setMainFileName(runnerDto.getFileName());
        qsEnterDataVo.setTaskId(runnerDto.getTaskId());

        qsEnterDataVo.setAlgorithmResultsJson(resultJson);
        return qsEnterDataVo;
    }
}
